package com.iweb.config;

import com.iweb.filter.AuthorizeGatewayFilterFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;

/**
 * 作者: jack
 * 时间: 2020-07-07 21:25
 * 描述: FilterConfig
 */
//@Configuration
//public class FilterConfig {
//
//    @Autowired
//    private AuthorizeGatewayFilterFactory authorizeGatewayFilter;
//
//    @Bean
//    public RouteLocator routeLocator(RouteLocatorBuilder builder) {
//        return builder.routes().route(route ->
//                route.path("/user/**")
//                        .uri("lb://provider")
//                        .filter(authorizeGatewayFilter)
//                        .id("provider-router-1")
//        ).build();
//    }
//
//}
